<!DOCTYPE html>
<html>
<head th:include="common/header_css::header('霸王餐小程序后台管理-商品信息','%mfile%datepicker')"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div th:replace="common/toolbar::toolbar('应用用户信息表管理')"></div>
        <div th:replace="common/search::search('%mapp')"></div>
    </div>
    <!-- End Panel Basic -->
</div>

<!--添加User模态框-->
<div id="modal-add-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">用户信息表添加</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="aform" method="post" class="form-horizontal" action="add"
                                      onsubmit="return checkAdd()">

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">登陆账户</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="username"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">真实姓名</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="name"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">昵称</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="nickName"
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">图像</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="avatarPic"
                                                           type="text" maxlength="200"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">性别</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="gender"
                                                           type="text" maxlength="10"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">城市</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="city"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">省</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="province"
                                                           type="text" maxlength="30"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">县城</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="country"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">语言</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="language"
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">公司名称</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="company"
                                                           type="text" maxlength="60"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">职位</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="jobTitle"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">手机号</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="phone"
                                                           type="number" phone maxlength="11"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">座机电话</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="telphone"
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">邮箱</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="email"
                                                           type="email" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">微信</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="weixin"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">微博</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="weibo"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">当前积分</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="jifen"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否会员</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="isMember" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">会员级别</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="memberLevel"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">会员折扣</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="discount"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否支持会员卡现金业务</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="isEcashCard"
                                                           value="-1">
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否启用</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="state" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">来源方式</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="originType">
                                                        <option value="">请选择</option>
                                                        <option value="0">自行注册</option>
                                                        <option value="1">海报连接</option>
                                                        <option value="2">激活码</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">用户类型 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="userType">
                                                        <option value="0">试用用户</option>
                                                        <option value="1">单店管理员</option>
                                                        <option value="2">总店管理员</option>
                                                        <option value="3">代理用户</option>
                                                        <option value="4">运营人员</option>
                                                        <option value="5">测试人员</option>
                                                        <option value="9">超级管理员</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">系统类型</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="apptype">
                                                        <option value="">请选择</option>
                                                        <option value="1">微信公众号</option>
                                                        <option value="2">微信小程序</option>
                                                        <option value="3">微信商城</option>
                                                        <option value="4">微信app</option>
                                                        <option value="5">支付宝小程序</option>
                                                        <option value="6">百度小程序</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">版本控制</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="version"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否手机注册</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" class="js-switch" name="isRegist" value="-1">
                                                </div>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">订阅时间
                                                </label>
                                                <div class="col-sm-8">
                                                    <input type="date" class="form-control selectData" readonly
                                                           id="subscribeTime" name="subscribeTime">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">备注</label>
                                                <div class="col-sm-10">
                                                            <textarea class="form-control" name="remark" maxlength="500"
                                                            ></textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-add-form">取消
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--修改User模态框-->
<div id="modal-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">用户信息表修改</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="mform" method="post" class="form-horizontal" action="modify"
                                      onsubmit="return checkModify()">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">登陆账户</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="username" name="username"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">真实姓名</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="name" name="name"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">昵称</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="nickName" name="nickName"
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">图像</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="avatarPic" name="avatarPic"
                                                           type="text" maxlength="200"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">性别</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="gender" name="gender"
                                                           type="text" maxlength="10"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">城市</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="city" name="city"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">省</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="province" name="province"
                                                           type="text" maxlength="30"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">县城</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="country" name="country"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">语言</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="language" name="language"
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">公司名称</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="company" name="company"
                                                           type="text" maxlength="60"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">职位</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="jobTitle" name="jobTitle"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">手机号</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="phone" name="phone"
                                                           type="number" phone maxlength="11"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">座机电话</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="telphone" name="telphone"
                                                           type="text" maxlength="20"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">邮箱</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="email" name="email"
                                                           type="email" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">微信</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="weixin" name="weixin"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">微博</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="weibo" name="weibo"
                                                           type="text" maxlength="50"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">当前积分</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="jifen" name="jifen"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否会员</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="isMember" name="isMember" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">会员级别</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="memberLevel" name="memberLevel"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">会员折扣</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="discount" name="discount"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否支持会员卡现金业务</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="isEcashCard" name="isEcashCard"
                                                           value="-1">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否启用</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="state" name="state" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">来源方式</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="originType" id="originType">
                                                        <option value="">请选择</option>
                                                        <option value="0">自行注册</option>
                                                        <option value="1">海报连接</option>
                                                        <option value="2">激活码</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">用户类型 *
                                                </label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="userType" id="userType">
                                                        <option value="0">试用用户</option>
                                                        <option value="1">单店管理员</option>
                                                        <option value="2">总店管理员</option>
                                                        <option value="3">代理用户</option>
                                                        <option value="4">运营人员</option>
                                                        <option value="5">测试人员</option>
                                                        <option value="9">超级管理员</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">系统类型</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="apptype" id="apptype">
                                                        <option value="">请选择</option>
                                                        <option value="2">微信小程序</option>
                                                        <option value="1">微信公众号</option>
                                                        <option value="3">微信商城</option>
                                                        <option value="4">微信app</option>
                                                        <option value="5">支付宝小程序</option>
                                                        <option value="6">百度小程序</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">版本控制</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="version" name="version"
                                                           type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否手机注册</label>
                                                <div class="col-sm-8">
                                                    <input type="checkbox" id="isRegist" name="isRegist" value="-1">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">订阅时间</label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control selectData" readonly
                                                           id="subscribeTime2" name="subscribeTime">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">备注</label>
                                                <div class="col-sm-10">
                                                            <textarea id="remark" name="remark" class="form-control"
                                                                      maxlength="500"
                                                            ></textarea>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="id" name="id" type="hidden" value=""/>
                                    <input id="hidid" name="hidid" type="hidden" value=""/>
                                    <input id="isAdmin" type="hidden" th:value="${isAdmin}"/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div th:include="common/footer_js::footer"></div>

<script>

    $(document).ready(function () {

    });
</script>
<script src="/js/admin/user.js"></script>
</body>
</html>
